//
//  UUAlertAction.h
//  UUZuche
//
//  Created by phenmod on 14-10-16.
//
//

#import <Foundation/Foundation.h>
@class UUAlertAction;

typedef void (^UUAlertActionHandlerBlock)(UUAlertAction *action);

typedef NS_ENUM(NSUInteger, UUAlertActionStyle)
{
    UUAlertActionStyleDefault = 0,
    UUAlertActionStyleCancel,
    UUAlertActionStyleDestructive
};


@interface UUAlertAction : NSObject
+ (instancetype)actionWithTitle:(NSString *)title
                          style:(UUAlertActionStyle)style
                        handler:(UUAlertActionHandlerBlock)handler;
@property (nonatomic, readonly) NSString *title;
@property (nonatomic, readonly) UUAlertActionStyle style;
@property (nonatomic, copy, readonly) UUAlertActionHandlerBlock handlerBlock;

// don't use this!
@property (nonatomic, assign) NSInteger assignedIndex;
@end
